.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "PUPPET\-MODULE" "8" "November 2024" "Puppet, Inc." "Puppet manual"
.
.SH "NAME"
\fBpuppet\-module\fR \- Creates, installs and searches for modules on the Puppet Forge\.
.
.SH "SYNOPSIS"
puppet module \fIaction\fR [\-\-environment production ] [\-\-modulepath ]
.
.SH "DESCRIPTION"
This subcommand can find, install, and manage modules from the Puppet Forge, a repository of user\-contributed Puppet code\. It can also generate empty modules, and prepare locally developed modules for release on the Forge\.
.
.SH "OPTIONS"
Note that any setting that\'s valid in the configuration file is also a valid long argument, although it may or may not be relevant to the present action\. For example, \fBserver\fR and \fBrun_mode\fR are valid settings, so you can specify \fB\-\-server <servername>\fR, or \fB\-\-run_mode <runmode>\fR as an argument\.
.
.P
See the configuration file documentation at \fIhttps://puppet\.com/docs/puppet/latest/configuration\.html\fR for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet with \fB\-\-genconfig\fR\.
.
.TP
\-\-render\-as FORMAT
The format in which to render output\. The most common formats are \fBjson\fR, \fBs\fR (string), \fByaml\fR, and \fBconsole\fR, but other options such as \fBdot\fR are sometimes available\.
.
.TP
\-\-verbose
Whether to log verbosely\.
.
.TP
\-\-debug
Whether to log debug information\.
.
.TP
\-\-environment production
The environment in which Puppet is running\. For clients, such as \fBpuppet agent\fR, this determines the environment itself, which Puppet uses to find modules and much more\. For servers, such as \fBpuppet server\fR, this provides the default environment for nodes that Puppet knows nothing about\.
.
.IP
When defining an environment in the \fB[agent]\fR section, this refers to the environment that the agent requests from the primary server\. The environment doesn\'t have to exist on the local filesystem because the agent fetches it from the primary server\. This definition is used when running \fBpuppet agent\fR\.
.
.IP
When defined in the \fB[user]\fR section, the environment refers to the path that Puppet uses to search for code and modules related to its execution\. This requires the environment to exist locally on the filesystem where puppet is being executed\. Puppet subcommands, including \fBpuppet module\fR and \fBpuppet apply\fR, use this definition\.
.
.IP
Given that the context and effects vary depending on the config section \fIhttps://puppet\.com/docs/puppet/latest/config_file_main\.html#config\-sections\fR in which the \fBenvironment\fR setting is defined, do not set it globally\.
.
.TP
\-\-modulepath
The search path for modules, as a list of directories separated by the system path separator character\. (The POSIX path separator is \':\', and the Windows path separator is \';\'\.)
.
.IP
Setting a global value for \fBmodulepath\fR in puppet\.conf is not allowed (but it can be overridden from the commandline)\. Please use directory environments instead\. If you need to use something other than the default modulepath of \fB<ACTIVE ENVIRONMENT\'S MODULES DIR>:$basemodulepath\fR, you can set \fBmodulepath\fR in environment\.conf\. For more info, see \fIhttps://puppet\.com/docs/puppet/latest/environments_about\.html\fR
.
.SH "ACTIONS"
.
.TP
\fBchanges\fR \- Show modified files of an installed module\.
\fBSYNOPSIS\fR
.
.IP
puppet module changes \fIpath\fR
.
.IP
\fBDESCRIPTION\fR
.
.IP
Shows any files in a module that have been modified since it was installed\. This action compares the files on disk to the md5 checksums included in the module\'s checksums\.json or, if that is missing, in metadata\.json\.
.
.IP
\fBRETURNS\fR
.
.IP
Array of strings representing paths of modified files\.
.
.TP
\fBinstall\fR \- Install a module from the Puppet Forge or a release archive\.
\fBSYNOPSIS\fR
.
.IP
puppet module install [\-\-force | \-f] [\-\-target\-dir DIR | \-i DIR] [\-\-ignore\-dependencies] [\-\-version VER | \-v VER] \fIname\fR
.
.IP
\fBDESCRIPTION\fR
.
.IP
Installs a module from the Puppet Forge or from a release archive file\. Note: Module install uses MD5 checksums, which are prohibited on FIPS enabled systems\.
.
.IP
The specified module will be installed into the directory specified with the \fB\-\-target\-dir\fR option, which defaults to the first directory in the modulepath\.
.
.IP
\fBOPTIONS\fR \fI\-\-force\fR | \fI\-f\fR \- Force overwrite of existing module, if any\. Implies \-\-ignore\-dependencies\.
.
.IP
\fI\-\-ignore\-dependencies\fR \- Do not attempt to install dependencies\. Implied by \-\-force\.
.
.IP
\fI\-\-target\-dir DIR\fR | \fI\-i DIR\fR \- The directory into which modules are installed; defaults to the first directory in the modulepath\.
.
.IP
Specifying this option will change the installation directory, and will use the existing modulepath when checking for dependencies\. If you wish to check a different set of directories for dependencies, you must also use the \fB\-\-environment\fR or \fB\-\-modulepath\fR options\.
.
.IP
\fI\-\-version VER\fR | \fI\-v VER\fR \- Module version to install; can be an exact version or a requirement string, eg \'>= 1\.0\.3\'\. Defaults to latest version\.
.
.IP
\fBRETURNS\fR
.
.IP
Pathname object representing the path to the installed module\.
.
.TP
\fBlist\fR \- List installed modules
\fBSYNOPSIS\fR
.
.IP
puppet module list [\-\-tree]
.
.IP
\fBDESCRIPTION\fR
.
.IP
Lists the installed puppet modules\. By default, this action scans the modulepath from puppet\.conf\'s \fB[main]\fR block; use the \-\-modulepath option to change which directories are scanned\.
.
.IP
The output of this action includes information from the module\'s metadata, including version numbers and unmet module dependencies\.
.
.IP
\fBOPTIONS\fR \fI\-\-tree\fR \- Whether to show dependencies as a tree view
.
.IP
\fBRETURNS\fR
.
.IP
hash of paths to module objects
.
.TP
\fBuninstall\fR \- Uninstall a puppet module\.
\fBSYNOPSIS\fR
.
.IP
puppet module uninstall [\-\-force | \-f] [\-\-ignore\-changes | \-c] [\-\-version=] \fIname\fR
.
.IP
\fBDESCRIPTION\fR
.
.IP
Uninstalls a puppet module from the modulepath (or a specific target directory)\. Note: Module uninstall uses MD5 checksums, which are prohibited on FIPS enabled systems\.
.
.IP
\fBOPTIONS\fR \fI\-\-force\fR | \fI\-f\fR \- Force the uninstall of an installed module even if there are local changes or the possibility of causing broken dependencies\.
.
.IP
\fI\-\-ignore\-changes\fR | \fI\-c\fR \- Uninstall an installed module even if there are local changes to it\. (Implied by \-\-force\.)
.
.IP
\fI\-\-version=\fR \- The version of the module to uninstall\. When using this option, a module matching the specified version must be installed or else an error is raised\.
.
.IP
\fBRETURNS\fR
.
.IP
Hash of module objects representing uninstalled modules and related errors\.
.
.TP
\fBupgrade\fR \- Upgrade a puppet module\.
\fBSYNOPSIS\fR
.
.IP
puppet module upgrade [\-\-force | \-f] [\-\-ignore\-dependencies] [\-\-ignore\-changes | \-c] [\-\-version=] \fIname\fR
.
.IP
\fBDESCRIPTION\fR
.
.IP
Upgrades a puppet module\. Note: Module upgrade uses MD5 checksums, which are prohibited on FIPS enabled systems\.
.
.IP
\fBOPTIONS\fR \fI\-\-force\fR | \fI\-f\fR \- Force the upgrade of an installed module even if there are local changes or the possibility of causing broken dependencies\. Implies \-\-ignore\-dependencies\.
.
.IP
\fI\-\-ignore\-changes\fR | \fI\-c\fR \- Upgrade an installed module even if there are local changes to it\. (Implied by \-\-force\.)
.
.IP
\fI\-\-ignore\-dependencies\fR \- Do not attempt to install dependencies\. Implied by \-\-force\.
.
.IP
\fI\-\-version=\fR \- The version of the module to upgrade to\.
.
.IP
\fBRETURNS\fR
.
.IP
Hash
.
.SH "EXAMPLES"
\fBchanges\fR
.
.P
Show modified files of an installed module:
.
.P
$ puppet module changes /etc/puppetlabs/code/modules/vcsrepo/ warning: 1 files modified lib/puppet/provider/vcsrepo\.rb
.
.P
\fBinstall\fR
.
.P
Install a module:
.
.P
$ puppet module install puppetlabs\-vcsrepo Preparing to install into /etc/puppetlabs/code/modules \.\.\. Downloading from https://forgeapi\.puppet\.com \.\.\. Installing \-\- do not interrupt \.\.\. /etc/puppetlabs/code/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
.
.P
Install a module to a specific environment:
.
.P
$ puppet module install puppetlabs\-vcsrepo \-\-environment development Preparing to install into /etc/puppetlabs/code/environments/development/modules \.\.\. Downloading from https://forgeapi\.puppet\.com \.\.\. Installing \-\- do not interrupt \.\.\. /etc/puppetlabs/code/environments/development/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
.
.P
Install a specific module version:
.
.P
$ puppet module install puppetlabs\-vcsrepo \-v 0\.0\.4 Preparing to install into /etc/puppetlabs/modules \.\.\. Downloading from https://forgeapi\.puppet\.com \.\.\. Installing \-\- do not interrupt \.\.\. /etc/puppetlabs/code/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
.
.P
Install a module into a specific directory:
.
.P
$ puppet module install puppetlabs\-vcsrepo \-\-target\-dir=/opt/puppetlabs/puppet/modules Preparing to install into /opt/puppetlabs/puppet/modules \.\.\. Downloading from https://forgeapi\.puppet\.com \.\.\. Installing \-\- do not interrupt \.\.\. /opt/puppetlabs/puppet/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
.
.P
Install a module into a specific directory and check for dependencies in other directories:
.
.P
$ puppet module install puppetlabs\-vcsrepo \-\-target\-dir=/opt/puppetlabs/puppet/modules \-\-modulepath /etc/puppetlabs/code/modules Preparing to install into /opt/puppetlabs/puppet/modules \.\.\. Downloading from https://forgeapi\.puppet\.com \.\.\. Installing \-\- do not interrupt \.\.\. /opt/puppetlabs/puppet/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
.
.P
Install a module from a release archive:
.
.P
$ puppet module install puppetlabs\-vcsrepo\-0\.0\.4\.tar\.gz Preparing to install into /etc/puppetlabs/code/modules \.\.\. Downloading from https://forgeapi\.puppet\.com \.\.\. Installing \-\- do not interrupt \.\.\. /etc/puppetlabs/code/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
.
.P
Install a module from a release archive and ignore dependencies:
.
.P
$ puppet module install puppetlabs\-vcsrepo\-0\.0\.4\.tar\.gz \-\-ignore\-dependencies Preparing to install into /etc/puppetlabs/code/modules \.\.\. Installing \-\- do not interrupt \.\.\. /etc/puppetlabs/code/modules └── puppetlabs\-vcsrepo (v0\.0\.4)
.
.P
\fBlist\fR
.
.P
List installed modules:
.
.P
$ puppet module list /etc/puppetlabs/code/modules ├── bodepd\-create_resources (v0\.0\.1) ├── puppetlabs\-bacula (v0\.0\.2) ├── puppetlabs\-mysql (v0\.0\.1) ├── puppetlabs\-sqlite (v0\.0\.1) └── puppetlabs\-stdlib (v2\.2\.1) /opt/puppetlabs/puppet/modules (no modules installed)
.
.P
List installed modules in a tree view:
.
.P
$ puppet module list \-\-tree /etc/puppetlabs/code/modules └─┬ puppetlabs\-bacula (v0\.0\.2) ├── puppetlabs\-stdlib (v2\.2\.1) ├─┬ puppetlabs\-mysql (v0\.0\.1) │ └── bodepd\-create_resources (v0\.0\.1) └── puppetlabs\-sqlite (v0\.0\.1) /opt/puppetlabs/puppet/modules (no modules installed)
.
.P
List installed modules from a specified environment:
.
.P
$ puppet module list \-\-environment production /etc/puppetlabs/code/modules ├── bodepd\-create_resources (v0\.0\.1) ├── puppetlabs\-bacula (v0\.0\.2) ├── puppetlabs\-mysql (v0\.0\.1) ├── puppetlabs\-sqlite (v0\.0\.1) └── puppetlabs\-stdlib (v2\.2\.1) /opt/puppetlabs/puppet/modules (no modules installed)
.
.P
List installed modules from a specified modulepath:
.
.P
$ puppet module list \-\-modulepath /opt/puppetlabs/puppet/modules /opt/puppetlabs/puppet/modules (no modules installed)
.
.P
\fBuninstall\fR
.
.P
Uninstall a module:
.
.P
$ puppet module uninstall puppetlabs\-ssh Removed /etc/puppetlabs/code/modules/ssh (v1\.0\.0)
.
.P
Uninstall a module from a specific directory:
.
.P
$ puppet module uninstall puppetlabs\-ssh \-\-modulepath /opt/puppetlabs/puppet/modules Removed /opt/puppetlabs/puppet/modules/ssh (v1\.0\.0)
.
.P
Uninstall a module from a specific environment:
.
.P
$ puppet module uninstall puppetlabs\-ssh \-\-environment development Removed /etc/puppetlabs/code/environments/development/modules/ssh (v1\.0\.0)
.
.P
Uninstall a specific version of a module:
.
.P
$ puppet module uninstall puppetlabs\-ssh \-\-version 2\.0\.0 Removed /etc/puppetlabs/code/modules/ssh (v2\.0\.0)
.
.P
\fBupgrade\fR
.
.P
upgrade an installed module to the latest version
.
.P
$ puppet module upgrade puppetlabs\-apache /etc/puppetlabs/puppet/modules └── puppetlabs\-apache (v1\.0\.0 \-> v2\.4\.0)
.
.P
upgrade an installed module to a specific version
.
.P
$ puppet module upgrade puppetlabs\-apache \-\-version 2\.1\.0 /etc/puppetlabs/puppet/modules └── puppetlabs\-apache (v1\.0\.0 \-> v2\.1\.0)
.
.P
upgrade an installed module for a specific environment
.
.P
$ puppet module upgrade puppetlabs\-apache \-\-environment test /etc/puppetlabs/code/environments/test/modules └── puppetlabs\-apache (v1\.0\.0 \-> v2\.4\.0)
.
.SH "COPYRIGHT AND LICENSE"
Copyright 2012 by Puppet Inc\. Apache 2 license; see COPYING
